BiWeeklyEvaluationViewModel

class BiWeeklyEvaluationViewModel @Inject constructor(biWeeklyMoodRepository: BiWeeklyMoodRepository) : ViewModel

ViewModel for handling bi-weekly mood evaluation operations.

This ViewModel manages the state of the bi-weekly evaluation, including navigating through the pages, updating responses, and submitting the bi-weekly mood entry.

Constructors

Link copied to clipboard
@Inject
constructor(biWeeklyMoodRepository: BiWeeklyMoodRepository)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open fun addCloseable(closeable: AutoCloseable)
fun addCloseable(key: String, closeable: AutoCloseable)
Link copied to clipboard

Debugging function that calculates and logs the depression and anxiety scores based on the responses.

Link copied to clipboard
Link copied to clipboard
fun onBack()

Decrements the page count.

Link copied to clipboard
fun onNext()

Increments the page count and triggers the submission if it's the last page.

Link copied to clipboard
fun onSelect(selected: Int)

Updates the response for the current question.